/**
 * 
 */
package cx3k.GUI;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.net.URL;
import javax.swing.*;


/**
 * @author Chris
 *
 */
public class HelpFrame extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public HelpFrame() {
		super();
		this.setTitle("Help");
		this.setSize(550, 300);
		
		JEditorPane jep;
		
		//Gets the help page from the same package as the help frame.
		URL path = this.getClass().getResource("help.html");	
		try {
			jep = new JEditorPane(path);
			jep.setEditable(false);
			this.add(jep);
		}
		catch (Exception e) {
			
		}
		
		
		// Center frame on screen
		Toolkit toolkit = this.getToolkit();
	    Dimension size = toolkit.getScreenSize();
	    this.setLocation(size.width/2 - getWidth()/2, size.height/2 - getHeight()/2);
	    
	    
		this.setVisible(true);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
